package com.neusoft.oa.serviceImp;


import com.neusoft.oa.mapper.DraftMapper;
import com.neusoft.oa.pojo.Draft;
import com.neusoft.oa.service.IDraftService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DraftServiceImp implements IDraftService {
    @Autowired
    DraftMapper draftMapper;

    @Override
    public List<Draft> draftList(Draft draft) {
        return draftMapper.draftList(draft);
    }

    @Override
    public boolean draftInsert(Draft draft) {
        int n=draftMapper.draftInsert(draft);
        if(n>0)
            return true;
        return false;
    }

    @Override
    public boolean draftUpdate(Draft draft) {
        int n=draftMapper.draftUpdate(draft);
        if(n>0)
            return true;
        return false;
    }
}
